package com.ozveri.menu;

import android.app.Activity;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.view.animation.TranslateAnimation;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;

public class SlidingMenuActivity extends Activity implements OnClickListener{
	
	
	AnimationFactory animationFactory;
	AnimatedMainScreenFactory factory; 
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		factory = new AnimatedMainScreenFactory(9, getApplicationContext(),getWindowManager());
		RelativeLayout mainLayout = (RelativeLayout)factory.createMainScreen();
		if( mainLayout != null)
			setContentView(mainLayout);
		else
			setContentView(R.layout.main);
		
		animationFactory = new AnimationFactory(9, getApplicationContext(),getWindowManager());
		factory.mainButtons.get(0).setOnClickListener(this);




	}

	public void onClick(View v) {
		
		for (int i = 0; i < factory.mainButtons.size(); i++) {
	
			factory.mainButtons.get(i).startAnimation(animationFactory.setAnimation(factory,i));	
		}
		
	}

}